// 请求工具
const app = getApp();
function Request(requestBody) {
  var _this = this;
  var url = requestBody.url;
  if (!requestBody.method) { //默认Get请求
    requestBody.method = 'GET';
  }
  let token = wx.getStorageSync('token')
  let useruuid = wx.getStorageSync('useruuid')
  wx.request({
    url: app.globalData.baseURL + url,
    data: requestBody.data,
    method: requestBody.method,
    header: {
      //预留token携带
      "Content-Type": "application/json",
      'token':'d2d5e09088b202d3dfd5d43ead294a9c',
      "USER-ACCESS-TOKEN": token,
      "USER-UUID":useruuid
    },
    success(res) {
      requestBody.sCallback(res);
    }
  })
}
module.exports = {
  //暴露接口
  Request: Request
}